home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # Launch script for Adobe ShowPS PostScript Previewer
- # Copyright 1994, Adobe Systems Incorporated
- #
- MAJOR_VERSION=2
- MINOR_VERSION=1
- REVISION=2a
- LAST_INSTALL_DATE="Fri Jun 16 17:31:19 PDT 1995"
- #
- # The process running this script can define and export
- # DPSNX_EXTRA_PSRES to add additional resources to the :: default
- # for NX.
- #
- EXECNAME=dpsnx.agent.exec
- INSTALL_DIR=/usr/adobe/DPSNXBasic_2.1.1
- if [ ! -d "$INSTALL_DIR" ] ; then
- INSTALL_DIR=${DPSNXBASIC_HOME:-"/usr/adobe/DPSNXBasic_${MAJOR_VERSION}.${MINOR_VERSION}"}
- if [ ! -d "$INSTALL_DIR" ] ; then
- # Try to determine automatically the parent directory to this launch script.
- thisscriptname=$0
-
- # Follow any symbolic links in thisscriptname.
- while : ; do
- lsresult=`ls -l $thisscriptname`
- symlink=`expr "$lsresult" : '.*>'.*`
-
- if [ "$symlink" -gt 0 ] ; then
- oldscriptname="$thisscriptname"
- thisscriptname=`echo $lsresult | sed -e 's/^.*-> *\(.*\) *$/\1/g'`
- abspath_new=`expr "$thisscriptname" : '^/'`
- if [ $abspath_new != 1 ] ; then
- abspath_old=`expr "$oldscriptname" : '^/'`
- if [ $abspath_old != 1 ] ; then
- olddir=`pwd`
- else
- olddir=`expr "$oldscriptname" : '\(.*\)/'`
- fi
- thisscriptname="$olddir/$thisscriptname"
- fi
- else
- break
- fi
- done
-
- # Determine directory containing this shell script.
- scriptdir=`expr $thisscriptname : '\(.*\)/'`
- if [ "$scriptdir" = "" -o "$scriptdir" = "." ] ; then
- scriptdir=`pwd`
- fi
-
- # Determine root directory for installation ($scriptdir/..).
- parentdir=`expr $scriptdir : '\(.*\)/'`
-
- if [ -r "$parentdir/exec/$EXECNAME" ] ; then
- INSTALL_DIR="$parentdir"
- fi
- fi
- fi
- if [ ! -d "$INSTALL_DIR" ] ; then
- echo "showps: Error: can't find ShowPS program."
- exit 1
- fi
-
- DEFAULT_PSRES="/usr/adobe/DPSNXBasic_2.1.1/psres"
- EXEC_DIR="$INSTALL_DIR/exec"
- DPSNXPSRES="${DPSNXPSRES:-$HOME/psres:/usr/psres:$DEFAULT_PSRES}"
- DPSNXPSRES=${DPSNX_EXTRA_PSRES:+"$DPSNX_EXTRA_PSRES":}$DPSNXPSRES
- export DPSNXPSRES
-
- opt=""
- while [ $# -gt 0 ] ; do
- case "$1" in
- -psres)
- case "$DPSNXBC" in
- 1.0) ;;
- *) opt="$opt $1 $2" ;;
- esac
- shift 2
- ;;
- *)
- opt="$opt $1"
- shift
- ;;
- esac
- done
-
- cd $EXEC_DIR || exit 1
-
- exec ./$EXECNAME $opt
-